<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>提交订单</title>
		<link rel="stylesheet" type="text/css" href="css2/public.css"/>
		<link rel="stylesheet" type="text/css" href="css2/proList.css" />
		<link rel="stylesheet" type="text/css" href="css2/mygxin.css" />
	</head>
	<style type="text/css">
		.zong{
			width: 1150px;
			height: 100%;
			margin: auto;
			background-color: lightblue;
		}
		.content{
			width: 710px;height: 160px;
			border: 3px solid #eee8ea;
			margin-top: 10px;
			float: left;
		}
		.you{width: 200px;
			height: 94%;
			margin-top: 1.5%;
			float: left;
			border-right: 3px solid #eee8ea;
			position: relative;}
		.you p{position: absolute;
			left: 15%;
			top:-10%;}
		.zuo{
			position: relative;
			width: 490px;
			height: 100%;
			float: right;
			font-size: 22px;
			/*background-color: pink;*/
		}
		.label{
            position: absolute;
            top: 35px;
            left: 60px;
		}
		.orderR {
			width: 420px;
			height: 100%;
			float: right;
			/*background-color: pink;*/

		}
	</style>
	<body>
		<?php require 'top.php';?>





		
		<div class="order cart mt">
			<!-----------------site------------------->
			<div class="site">
				<p class="wrapper clearfix">
					<span class="fl">订单提交</span>
					<img class="top" src="img/temp/cartTop03.png">
				</p>
			</div>
			<!-----------------orderCon------------------->
			<div class="orderCon wrapper clearfix">
				<div class="orderL fl" style="margin-top: -45px;">

					
					<!--------h3---------------->
					<h3>订单详情</h3>
					<!--------addres---------------->
					<div class="addres clearfix">


<?php
error_reporting(5);
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
header('content-type:text/html;charset=utf-8');

$con = "SELECT * FROM order_tj WHERE email='".$_SESSION['login']."'";

$que = mysqli_query($config,$con);


$userinfo = mysqli_fetch_array($que);
       // if(isset($_SESSION['login'])){ 
// var_dump($userinfo);
$field=$_SESSION['login'];
	// $fieldbig=$_GET['actbig'];
	       if($field!=""){
	       	$sql="SELECT * FROM order_tj WHERE `email`='$field' ";
	       	// $sql="SELECT * FROM order_tj ORDER BY tj_id DESC";
	       	$result = mysqli_query($config,$sql) or die ('SQL语句有误：'.mysqli_error());
	       }
// var_dump($result);


while ($ro=mysqli_fetch_array($result)){
// var_dump($ro['tj_id']);	
       	?>    <!-- 提前结束php语句 -->




<div class="content">
							

						<div class="zuo">
							<div class="label">
						<label><span style="font-weight: bold;">订单编号:</span>&nbsp;&nbsp;<?php echo $ro['bianhao'] ?></label><br/>
						<label><span style="font-weight: bold;">购买用户:</span>&nbsp;&nbsp;<?php echo $ro['u_name'] ?></label><br/>
						<label><span style="font-weight: bold;">购买时间:</span>&nbsp;&nbsp;<?php echo $ro['pub_time'] ?></label><br/>
					        </div>
					    </div>
						<div class="you">
						<p class="ok" style="font-size: 18px;margin-left:14px;">订单提交成功！
							<!-- <a class="del" href="order_ok_delete.php?id=<?php echo $ro['tj_id']?>" onclick="return confirm('是否移除该订单？');" style="text-decoration: none;font-size: 16px;">移除
							</a> -->
						</p>

						</div>
</div>

			<?php }

				?>

					</div>

					<!-- <h3><a style="text-decoration: none;margin-left: 320px;" href="order_goods_kucun.php"><button style="width: 80px;height: 35px;background-color: #be4141;margin-top: 5px;border-radius: 10px;color: white;font-size: 18px;">确认提交</button></a></h3> -->

					<h3>支付方式</h3>
					<!--------way---------------->
					<div class="way clearfix">
						<!-- <img  src="img/temp/way01.jpg"> 
						<img src="img/temp/way02.jpg"> 
						<img src="img/temp/way03.jpg">  -->
						<img class="on"src="img/temp/way04.jpg"> 
					</div>
					<h3>选择快递</h3>
					<!--------dis---------------->
					<div class="dis clearfix">
						<span class="on">同校配送</span>
						<!-- <span >顺风快递</span>
						<span>圆通快递</span>
						<span>中通快递</span> -->
					</div>
				</div>

				<?php 
				error_reporting(5);
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
header('content-type:text/html;charset=utf-8');
//身份验证
session_start();
if (!isset($_SESSION['login'])) {
	header('Refresh:2;url=login/index.php');
	echo "你还没有登陆！";
	die();
}

$field=$_SESSION['login'];

	       if($field!=""){
	       	$sql="SELECT * FROM order_tj WHERE `email`='$field'";
	       	// $sql="SELECT * FROM order_tj ORDER BY tj_id DESC";
	       	$result = mysqli_query($config,$sql) or die ('SQL语句有误：'.mysqli_error());
	       }



				?>




				<div class="orderR fr">
					<div class="msg">
						<h3>全部订单内容
							<a href="index.php" class="fr">返回首页</a></h3>


						<!--------ul---------------->

						<?php 


$sum=0;
$yf=3;
 while ($ro=mysqli_fetch_array($result)){
 	$sum=$sum+$ro['cost'];
// var_dump($sql);

?>


						<ul class="clearfix">

							<li class="fl" style="width: 140px;height: 120px; ">
								<img src="images/goods/<?php echo $ro['bigtypeid'];?>/<?php echo $ro['smalltypeid'];?>/<?php echo $ro['picture'];?>" style="width: 100%;height: 100%;">
							</li>
							<li class="fl">
								<p><?php echo $ro['goodsname'];?></p>
								<p>数量：1</p>
							</li>
							<li class="fr">￥<?php echo $ro['cost'];?></li>
						</ul>


<?php      
  }
// }
?>


					</div>
					<!--------tips---------------->
					<div class="tips">
						<p><span class="fl">商品金额：</span><span class="fr" style="color: #c10000;">￥<?php echo $sum;?></span></p>
						<p><span class="fl">优惠金额：</span><span class="fr">￥0.00</span></p>
						<!-- <p><span class="fl">运费：</span><span class="fr">￥3.00</span></p> -->
					</div>
					<!--------tips count---------------->
					<!-- <div class="count tips">
						<p><span class="fl">合计：</span><span class="fr">￥<?php echo $sum+$yf;?></span></p>
					</div> -->

				</div>
			</div>
		</div>

		






<!-- 
		<script src="js2/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/pro.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/user.js" type="text/javascript" charset="utf-8"></script> -->




	</body>

</html>
